package fun.tan90.easy.binlog.worker.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;


/**
 * description TODO
 * company 铁人科技
 *
 * @author 陈浩杰
 * @date 2023/7/13 10:31
 */
@Data
@ConfigurationProperties(prefix = EasyBinlogWorkerProperties.PREFIX)
public class EasyBinlogWorkerProperties {

    public static final String PREFIX = "easy-binlog";

    private String token;

    /**
     * manager注册地址
     */
    private List<String> managerRegisterUrls;

    /**
     * IP 地址块
     */
    private String cidr = "192.168.0.0/24";

    /**
     * 与manager的心跳间隔
     * 也是重连时间间隔
     */
    private int heartbeatInterval = 3000;

    /**
     * 请求默认超时
     */
    private int requestTimeout = 10000;

    /**
     * 配置连接超时
     */
    private int connectTimeout = 15000;

}
